<?php
header("Content-type:text/html; charset=utf-8");
require_once ('config.php');
require_once (WEBURL.'/include/conn.php');
require_once (WEBURL.'/login_status_check.php');
if(!checkLogin()){
	   $gotopage=base64_encode("sys_information_set.php");
	   header("Location:admin_login.php?gotopage=".$gotopage);	
}
else{
	require_once (WEBURL.'/system.class.php');
$_SESSION['allowed_select_model']="allowed";
$system=new System();
$website=$system->getWebSite();
$sys_style=$system->getSysStyle();
$index_model=$system->getIndexModel();
$index_movie=$system->getIndexMovie();
$search_model=$system->getSearchModel();
$template=$system->getTemplates();
$filename=WEBURL."/data/ipfilter/ipfilter.txt";
$ipfilter=file_get_contents($filename);
if($website==""){
	$website="http://localhost/hyqx";
}
if($sys_style==""){
	$sys_style="default";
}
if($index_model==""){
	$index_model="default.htm";
}
if($search_model==""){
	$search_model="default.htm";
}

if($template==""){
	$template=array("0"=>"default");
}else{
	$template=explode("|",$template);
}	

$smarty->assign("website",$website);
$smarty->assign("template",$template);
$smarty->assign("sys_style",$sys_style);
$smarty->assign("ipfilter",$ipfilter);
$smarty->assign("index_model","index/$index_model");
$smarty->assign("index_movie","index_movie/$index_movie");
$smarty->assign("search_model","search/$search_model");
$smarty->assign("title","系统设置");

$smarty->display("sys_information_set.htm",md5("sys_information_set.php"));
}